package com.yima.baseproj.module.app.pictureBill;


import com.yima.baseproj.module.app.pictureBill.model.PicBillAddModel;
import com.yima.baseproj.module.config.utils.ResultUtil;
import com.yima.baseproj.module.config.utils.ResultVo;
import com.yima.baseproj.module.sys.student.model.StudentSelectModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "图片订单管理")
@RestController
@RequestMapping("/api/app/picbill")
public class PicBillController {

    @Autowired
    private PicBillService picBillService;

    @ApiOperation("添加")
    @PostMapping("/add")
    public void add(@Validated @RequestBody PicBillAddModel picBill){
        picBillService.add(picBill);
    }


    @ApiOperation("查询电子底片选片列表")
    @GetMapping("/appBillPicFindList")
    public ResultVo findPictureIdList(@RequestParam("studentId") int studentId, @RequestParam("parentId")int parentId) {
        List<Integer> picIdList = picBillService.findBillPicIdFindList(studentId,parentId);
        return ResultUtil.success(picIdList);
    }

    @ApiOperation("查询实体相册入册列表")
    @GetMapping("/appBillPicPutFindList")
    public ResultVo findPicturePutIdList(@RequestParam("studentId") int studentId, @RequestParam("parentId")int parentId) {
        List<Integer> picIdList = picBillService.findBillPicPutIdFindList(studentId,parentId);
        return ResultUtil.success(picIdList);
    }


}
